package com.carbon.assets.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carbon.assets.entity.CarbonCreditAssets;
import com.carbon.assets.entity.CarbonQuotaAssets;
import com.carbon.assets.vo.CarbonCreditAssetsQueryVo;
import com.carbon.assets.vo.CarbonQuotaAssetsQueryVo;
import com.carbon.assets.vo.SelectorVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 碳配额资产 Mapper 接口
 * </p>
 *
 * @author Li Jun
 * @since 2022-04-24
 */
@Repository
public interface CarbonQuotaAssetsMapper extends BaseMapper<CarbonQuotaAssets> {


    

    void updateAmount(Long projectId, BigDecimal tradeQuantity);

    CarbonQuotaAssets getByCarbonProjectId(Long projectId);

    Page<CarbonQuotaAssetsQueryVo> selectBySelector(@Param("page") Page<CarbonQuotaAssets> page,
                                             @Param("query") SelectorVo selectorVo);
}
